﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;
using System.Threading.Tasks;
using Portal;
using Microsoft.SharePoint.Client.Services;

namespace Portal
{
    [BasicHttpBindingServiceMetadataExchangeEndpoint]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
     internal class Service : IService
     {

        public bool AddComment(string itemId, string user, string commentbody)
         {
             WebOperationContext.Current.OutgoingResponse.Headers.Add("Cache-Control", "no-cache");
             return PortalSocialLogic.AddComment(itemId, user, commentbody);

         }

         public string AddDeleteLike(string userlogin, string id, string isCurrentUserLike)
         {
             WebOperationContext.Current.OutgoingResponse.Headers.Add("Cache-Control", "no-cache");
             return PortalSocialLogic.AddDeleteLike(userlogin, id, isCurrentUserLike);

         }

         public LikesDetail GetAllLikes(string id)
         {
             WebOperationContext.Current.OutgoingResponse.Headers.Add("Cache-Control", "no-cache");
             return PortalSocialLogic.GetAllLikes(id);
         }

        

         public List<CommentDetails> AllComments(string id)
         {
             WebOperationContext.Current.OutgoingResponse.Headers.Add("Cache-Control", "no-cache");
             return PortalSocialLogic.AllComments(id);
         }


     }

}
